/* 
 * oms，一个基于J2EE架构运营支撑平台
 * Copyright © GrayRabbit Co., Ltd. All rights reserved.
 * Department:运营department
 * 更多信息请访问：
 * http://code.google.com/p/gray-rabbit-cms/
 */
package org.grayrabbit.cms.service.publish;

import java.util.List;

import org.grayrabbit.cms.entity.Admin;
import org.grayrabbit.cms.entity.PublishLog;
import org.grayrabbit.cms.entity.PublishTask;
import org.grayrabbit.cms.vo.publish.PublishTaskBean;

import org.grayrabbit.dao.util.Page;
import org.grayrabbit.service.GenericService;

/**
 * <b>OperLog</b>的service接口

 * @version 1.0,创建时间: 2012-01-05 17:51:15 
 */
public interface PublishTaskService extends GenericService {
	/**
	 * 根据主键查询实体
	 * @param taskId
	 * @return
	 */
	PublishTask getPublishTask(String taskId);
	/**
	 * 批量删除
	 * @param key
	 */
	void delete(String[] key);
	/**
	 * 删除实体
	 * @param publishTask
	 */
	void delete(PublishTask publishTask);
	/**
	 * 保存实体
	 * @param publishTask
	 */
	void save(PublishTask publishTask);
	/**
	 * 根据bean组装统计查询条件(名称参数)
	 * @param publishTask
	 * @return
	 */
	Page<PublishTask> getPage(PublishTaskBean publishTaskBean);
	/**
	 * 填充分页组件的查询：(名称参数)
	 * @param page
	 * @param publishTaskBean
	 */
	void list(Page<PublishTask> page, PublishTaskBean publishTaskBean);
	
	public PublishTask create(Admin currentAdmin, String taskName, String taskDesc,Boolean isAuto);
	public List<PublishLog> readPublishLogs(String taskId, int offset);
	
}